/*
 * p4472.cpp
 *
 *  Created on: 2013-10-22
 *      Author: zy
 */
#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;
const int maxn = 1001;
const int MOD = 1000000000 + 7;
int dp[maxn][maxn], n;
void DP()
{
	memset(dp, 0, sizeof(dp));
	dp[1][0] = 1;
	for (int i = 2; i <= 1000; i++)
		for (int j = 1; j <= i; j++)
		{
			if ((i - j - 1) % j == 0)
				dp[i][j] = dp[(i - j - 1) / j + 1][0];
			dp[i][0] = (dp[i][0]+dp[i][j])%MOD;
		}
}
int main()
{
	int cas = 0;
	DP();
	while (scanf("%d", &n) != EOF)
	{
		printf("Case %d: %d\n", ++cas, dp[n][0]);
	}
	return 0;
}
